package com.kmzx.one.project.mapper;

import com.github.pagehelper.Page;
import com.kmzx.one.project.entity.RankTab;
import com.kmzx.one.project.entity.UserMessage;
import com.kmzx.one.project.others.dto.FriendPic;
import com.kmzx.one.project.others.dto.MemberCenter;
import com.kmzx.one.project.others.dto.UserMsgInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;

/**
 * @Project one
 * @Author: carol
 * @Date: 2020/9/3-10:31
 */
@Component
public interface UserMessageMapper {

    int checkHasUserMsg(@Param("userId") String userId);

    void insertUserMessage(UserMessage userMessage);

    void readMessage(@Param("id") String id, @Param("updateTime") Date updateTime);

    void readMessageUser(@Param("id") String id, @Param("userId") String userId, @Param("updateTime") Date updateTime);

    void readMessageUserAll(@Param("userId") String userId, @Param("updateTime") Date updateTime);

    Page<UserMsgInfo> findUserMsgInfo(@Param("userId") String userId);

    List<FriendPic> selectFriendPic();

    List<MemberCenter> selectMemberCenter();

    RankTab selectUserMemberRank(@Param("userId") String userId);

}
